package com.itheima.boot.service.impl;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.itheima.boot.domain.Book;
import com.itheima.boot.mapper.BookMapper;
import com.itheima.boot.service.BookService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class BookServiceImpl implements BookService {

    @Autowired
    private BookMapper mapper;

    @Override
    public List<Book> getAll(Book book) {
        return mapper.getAll(book);
    }

    @Override
    public void add(Book book) {
        mapper.add(book);
    }

    @Override
    public void delete(Integer id) {

        mapper.delete(id);
    }

    @Override
    public Book selectById(Integer id) {
        return mapper.selectById(id);
    }

    @Override
    public void update(Book book) {

        mapper.update(book);
    }
}
